<h1><?=$id;?></h1>
<br />
<span><?=$edm_all_doc;?></span><br /> <br />
<?=$d_sort;?>
<select size="1" name="lang_ch" onchange="langCh(this,<?=$idc;?>);">
<?foreach($lang as $key=>$value):?>
<?if($cur_lang==$value['name']):?>
  <option value="<?=$value['name'];?>"><?=$value['alias'];?></option>
  <?endif;?>
  <?endforeach;?>

<?foreach($lang as $key=>$value):?>
<?if($cur_lang!=$value['name']):?>
  <option value="<?=$value['name'];?>"><?=$value['alias'];?></option>
  <?endif;?>
  <?endforeach;?>
</select><br /><br />
 <table  cellspacing="1" cellpadding="3" border="1"  rules="all" >
  <tr>
  <td>
  <?=$edm_doc;?>
  </td>

  <td>
  <?=$edm_lang;?>

  </td>

    <td>
  <?=$edm_nameModule;?>
  </td>

  <td>
  <?=$edm_module;?>
  </td>



  <td>
    <?=$edm_SH;?>
  </td>

  <td >
  <?=$edm_side;?>
  </td>

  <td >
  <?=$edm_operation;?>
  </td>

  </tr>


   <?foreach($all_doc as $key=>$value):?>
    <tr>
  <td>
   <?=strip_tags(substr($value['text'],0,200))."....";?>

  </td>

  <td>

  <?=$value['lang'];?>

  </td>
  <td>
  <?=$value['name_module'];?>
  </td>

  <td> <div style="margin-right:10px;">
  <?=$value['class'];?>
      </div>
  </td>

  <td>
  <div style="margin-right:10px;">




  <?if($value['show_me']) {  	echo'<a href="'.$admin_dir_full.'hidedoc/'.$value['id'].'/'.$idc.'/0">'.$edm_hide.'</a>';
  	echo'<span><b>'.$edm_show.'</b></span>';
        }else{        	echo'<a href="'.$admin_dir_full.'showdoc/'.$value['id'].'/'.$idc.'/1">'.$edm_show.'</a>';
  			echo'<span><b>'.$edm_hide.'</b></span>';
        }

  ;?>
   </div>
  </td>

  <td>

   <form  action="<?=$admin_dir_full;?>saveSideDoc/<?=$value['id'];?>/<?=$idc;?>" method="post">

   <select size="1" name="sidedoc">
   <option value="<?=$value['side_for_doc'];?>"><?=$value['side_for_doc'];?></option>
   <?foreach($side_doc As $key2=>$value2):?>
  <option value="<?=$value2['side'];?>"><?=$value2['side'];?></option>
  <?endforeach;?>
</select>
<input type="submit" value="<?=$edm_save;?>">
</form>
  </td>

  <td>
 <?if($value['s_edit']) echo'<a href="'.$admin_dir_full.'safe_launch/'.$value["class"].'/edit/'.$value['id'].'/'.$value['lang'].'">'.$edm_edit.'</a>';?>
  <?if($value['s_del']) echo'<a  onclick="return confirm('.$id_del.');"  href="'.$admin_dir_full.'safe_launch/'.$value["class"].'/del/'.$value['id'].'/'.'">'.$edm_del_all.'</a>';?>
  </td>
   </tr>
  <?endforeach;?>



  </table>

  <br />
 <?if(!empty($create_module)):?>
<form  action="<?=$admin_dir_full;?>launch/create/<?=$idc;?>" method="post">
  <select size="1" name="mod">
    <?foreach($create_module as $key=>$value):?>

    <? 	echo'<option value="'.$value['class'].'">'.$value['name_module'].'</option>';
    ?>


  <?endforeach;?>
</select>
<input type="submit" value="<?=$edm_add;?>">
</form>
<?endif;?>
   <br /><br />
<fieldset>
<legend><?=$e_freeDoc;?></legend>
<form name="" action="<?=$admin_dir_full;?>add_doc/<?=$idc;?>" method="post">
<select size="1" name="add_doc">
<?foreach($freeLink as $key=>$value):?>
  <option value="<?=$value['id'];?>"><? echo strip_tags(substr($value['text'],0,200)) ;?></option>
  <?endforeach;?>
</select>
<input type="submit" value="<?=$e_add;?>">
</form>
</fieldset>

